package week2nd;

public class AStest {
    public static void main(String[] args) {
        ArrayStack AS = new ArrayStack(3);

        System.out.println(AS.peek());

        AS.push(123);
        AS.push(456);
        AS.push(789);
        AS.push(1);
        AS.push(2);

        System.out.println("栈内:" + AS);

        System.out.print("pop结果:");
        int a = (int)AS.pop();
        System.out.println(a);

        System.out.print("peek结果:");
        System.out.println(AS.peek());

        System.out.print("栈内:");
        System.out.println(AS.toString());

        System.out.print("为空？");
        System.out.println(AS.isEmpty());
        System.out.print("为满？");
        System.out.println(AS.isFull());

        System.out.print("元素多少？");
        System.out.println(AS.size());
        System.out.print("栈大小:");
        System.out.println(AS.getMaxSize());
    }
}
